using System.Collections.Generic;
using NHibernate.Criterion;

namespace SimpleServiceBus.Persistence.NHibernate.Repositories
{
    public interface IRepository<T> where T : class
    {
        T SaveOrUpdate(T entity);
        T Get(int id);
        void Delete(T entity);
        T FindOne(params ICriterion[] queryCritiera);
        IList<T> FindAll(params ICriterion[] queryCriteria);
        IList<T> FindTopN(int topCount,string orderBy,bool ascending,params ICriterion[] queryCriteria);
    }
}